import config from '@/utils/config';
import { MockMethod } from 'vite-plugin-mock';

// 意见反馈类型
const getFeedbackType = {
  url: config.url.feedback_type,
  method: 'get',
  response: () => {
    return {
      code: 200,
      data: [
        { name: '新功能建议', value: '0' },
        { name: '功能异常', value: '1' },
        { name: '服务体验', value: '2' },
      ],
      message: 'success',
    };
  },
};

// 保存反馈意见
const saveFeedbackType = {
  url: config.url.feedback_save,
  method: 'post',
  response: () => {
    return {
      code: 200,
      data: 'success',
      message: 'success',
    };
  },
};

export default [getFeedbackType, saveFeedbackType] as MockMethod[];
